package com.jht.bletool2java.widget;

import android.content.Context;
import android.graphics.Color;
import android.util.AttributeSet;

public class ChangeColorTextView extends androidx.appcompat.widget.AppCompatTextView {

    @SuppressWarnings("all")
    private Runnable run = new Runnable() {
        @Override
        public void run() {
            ChangeColorTextView.super.setTextColor(Color.parseColor("#8A8484"));
        }
    };

    public ChangeColorTextView(Context context) {
        super(context);
    }

    public ChangeColorTextView(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    public ChangeColorTextView(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
    }

    public void setTextColorIn2S() {
        super.setTextColor(Color.BLACK);
        postDelayed(run, 1000);
    }

}
